package com.dengs.loadsequence;

public class Son extends Parent{

    public Son() {//如果不显示调用父类构造方法，则java默认调用无参数的父类构造方法
        super("hello");
        System.out.println("constuctor Son");
    }
    {//构造代码块是实例级别的，先于构造函数调用
        System.out.println("{} block Son");
    }
    static int i = 1;
    static {//静态代码块，是类级别的

        System.out.println("static Son, i = "+i++);
    }


    public static void main(String[] args) {
        new Son();// static{} {} contuctor()
        new Son();//调用{} contuctor{}
        System.out.println(Son.i);
        Integer f1 = 100,f2=100,f3=150,f4=150;
        System.out.printf("f1==f2 "+ (f1==f2));
        System.out.printf("f3==f4 "+ (f3==f4));
    }
}
